package com.lagou.service.impl;

import com.lagou.HelloService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;

@Service
public class HelloServiceImpl implements HelloService
{
    @Override
    public String sayHello()
    {
        return "hello";
    }

    @Override
    public String methodA()
    {
        try
        {
            Thread.sleep(new Random().nextInt(100));
        }
        catch (InterruptedException e)
        {
            e.printStackTrace();
        }
        return "methodA";
    }

    @Override
    public String methodB()
    {
        try
        {
            Thread.sleep(new Random().nextInt(100));
        }
        catch (InterruptedException e)
        {
            e.printStackTrace();
        }
        return "methodB";
    }

    @Override
    public String methodC()
    {
        try
        {
            Thread.sleep(new Random().nextInt(100));
        }
        catch (InterruptedException e)
        {
            e.printStackTrace();
        }
        return "methodC";
    }
}
